import { lazy } from "react";

const Index = lazy(() => import("../pages/index"));
const Home = lazy(() => import("../pages/home/index"));
const User = lazy(() => import("../pages/user/index"));
const Search = lazy(() => import("../pages/search/index"));
const Forum = lazy(() => import("../pages/forum/index"))
const Post = lazy(() => import("../pages/post/index"))

const Router: IRouteType.IRouer[] = [
    {
        name: "登录页",
        path: "/",
        element: Index,
        meta: { pageTitle: "登录页" },
    }, {
        name: "首页",
        path: "/home",
        element: Home,
        meta: { pageTitle: "首页" },
    }, {
        name: "个人中心",
        path: "/user",
        element: User,
        meta: { pageTitle: "个人中心" },
    }, {
        name: "搜索页",
        path: "/search",
        element: Search,
        meta: { pageTitle: "搜索页" },
    }, {
        name: "贴吧首页",
        path: "/forum",
        element: Forum,
        meta: { pageTitle: "贴吧首页" },
    }, {
        name: "帖子页面",
        path: "/post",
        element: Post,
        meta: { pageTitle: "帖子页面" },
    }
];

export default Router;  